package com.shuijianbaozi.child.testdemo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.constraint.ConstraintLayout;
import android.support.constraint.Guideline;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;

/**
 * add by shuijianbaozi on 2018/3/21
 * call me: 1649258746@qq.com
 *  优点:对于复杂的嵌套界面,使用这个嵌套的比个人手写的界面算法要简单
 * @https://github.com/shuijianbaozi
 * @http://blog.csdn.net/shuijianbaozi visit:http://blog.csdn.net/guolin_blog/article/details/53122387
 */

public class ConstraintActivity extends Activity {

    @InjectView(R.id.tvLogin)
    TextView tvLogin;
    @InjectView(R.id.etPassword)
    EditText etPassword;
    @InjectView(R.id.tvPassword)
    TextView tvPassword;
    @InjectView(R.id.tvAccount)
    TextView tvAccount;
    @InjectView(R.id.etAccount)
    EditText etAccount;
    @InjectView(R.id.btnLogin)
    Button btnLogin;
    @InjectView(R.id.btnRegist)
    Button btnRegist;
    @InjectView(R.id.guideline2)
    Guideline guideline2;
    @InjectView(R.id.activity_constraint)
    ConstraintLayout activityConstraint;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_constraint);
        ButterKnife.inject(this);
    }

    @OnClick({R.id.tvLogin, R.id.btnLogin, R.id.btnRegist})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tvLogin:
                break;
            case R.id.btnLogin:
                // 进入自动添加约束界面
                startActivity(new Intent(this,AutoConstraintActivity.class));
                break;
            case R.id.btnRegist:
                break;
        }
    }
}
